package vg.services.user_interface_manager.interfaces;

import javax.swing.*;

import vg.services.plugin_manager.event_and_request.event.AUIEvent;
import vg.services.plugin_manager.event_and_request.request.AUIRequest;

/**
 * Determines methods for user interface.
 *
 * @author Timur Zolotuhin (e-mail: tzolotuhin@gmail.com)
 */
public interface IUserInterfaceManager {
    /**
     * Adds new menu item to user interface.
     */
    public void addMenuItem(JMenuItem item, String place);

    /**
     * Adds new instrument to instrument panel.
     */
    public void addInstrument(AUserInterfaceElement element);

    /**
     * Adds new panel to user interface.
     */
    public void addElement(AUserInterfaceElement element, String place);

    /**
     * Adds new observer to user interface.
     */
    public void addObserver(UserInterfaceObserverAdapter adapter);

    /**
     * Adds new observer to user interface.
     */
    public void addObserver(IUserInterfaceObserver observer);

    /**
     * Sends request to decoders.
     */
    public void sendRequest(AUIRequest request);

    /**
     * Sends event to decoders.
     */
    public void sendEvent(AUIEvent event);

    /**
     * Exits from program.
     */
    public void quit();
	
	/**
	 * Returns main frame, which may use how parent for different dialogs   
	 */
	public JFrame getMainFrame();
}
